#define DETECT_MEM_LEAKS
#if defined (_DEBUG) && defined (DETECT_MEM_LEAKS)
#include <stdlib.h>
#include <crtdbg.h>
#endif

#include <windows.h>
#include "MainWnd.h"
#include "Resource.h"

int WINAPI WinMain(HINSTANCE instance,
				   HINSTANCE prevInstance,
				   CHAR* cmdLn,
				   int showType)
{
	HWND mainWnd;
	MSG msg;

#if defined (_DEBUG) && defined (DETECT_MEM_LEAKS)
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

	mainWnd = CreateMainWnd(instance);

	
	ShowWindow(mainWnd, showType);
	UpdateWindow(mainWnd);

	while(GetMessage(&msg, NULL, 0, 0))
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}
	return msg.wParam;

	return 0;
}